package itheima.ZuoYe03;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Test {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("张三丰");
        list.add("王思聪");
        list.add("张飞");
        list.add("刘晓敏");
        list.add("张靓颖");
        list.stream().map(s -> new Person(s))
                .collect(Collectors.toList())
                .forEach(person -> System.out.println(person));
    }
}
